include:
  - dev.stop_app
  - dev.roll_deploy
  - dev.start_app
    
step_one:
  cmd.run:
    - name: |
        echo "---------------------------------------------------------------------------------"
        echo "1,  start rollback to {{GIT_PREVIOUS_SUCCESSFUL_COMMIT}}"
        echo "---------------------------------------------------------------------------------"

step_two:
  cmd.run:
    - name: |
        echo "---------------------------------------------------------------------------------"
        echo "2,  restore confuration and libary info "
        echo "---------------------------------------------------------------------------------"
    - require:
      - cmd: stop_service
      - cmd: rollback_conf
      - cmd: rollback_lib
      - cmd: start_service

step_three:
  cmd.run:
    - name: |
        echo "---------------------------------------------------------------------------------"
        echo "3,  check application status"
        echo "---------------------------------------------------------------------------------"
    - require:
      - cmd: checkstatus
